<html>
<body>
<script src="../../static/jquery-2.0.3.min.js"></script>
<script type="text/javascript" charset="utf-8">
  var ipcRenderer = require('electron').ipcRenderer;
  var port = location.search.substr("?port=".length);
  $.ajax({
    type: "GET",
    url: "http://127.0.0.1:" + port,
    headers: {
      "Authorization": "Basic " + btoa("test:test")
    },
    success: function(result) {
      ipcRenderer.sendToHost(result);
    },
    error: function(xhr, status, error) {
      ipcRenderer.sendToHost(error);
    },
  });
</script>
</body>
</html>
